Frequently Asked Questions



JavaScript is the subject of a great deal of confusion, not helped by much misinformation published on the WWW !

Let's try and sort this out.

		  Q1)	Is JavaScript a simplified version of Java ?

		  Q2)	What do you mean by Object-Oriented ?

		  Q3)	Is there more than one version of JavaScript ?

		  Q4)	But, is JavaScript simple ?

		  Q5)	What 'tools' do I need to write JavaScript ?

	













Question 1 - Is JavaScript a simplified version of Java ?

No. It certainly isn't. This is one of the most common misconceptions about JavaScript. There is a resemblance in the syntax of the two languages, both use if, while, for etc but this is not an exact resemblance. JavaScript is an untyped language, inlike Java which is heavily typed. That is, you do not need to assign a type to an object or variable in JavaScript. You could declare a variable called 'sky' and then use it equally well to hold a number '10' or a string 'pie'. Java would not let you do this. They are also similar in that they both provide for executable content in web pages. (Java through its applets, JavaScript by allowing script to be embedded in HTML documents.) AND both are object-oriented. Java is a true OO language, in the vein of c++, JavaScript is just said to have 'object-oriented capabilities'. That is, it can handle the use of objects.






Back to Top Next Question










Question 2 - What do you mean by Object-Oriented ?

Basically it means that the language revolves around the use of objects. An object is a thing. In the real world for example, a car is an object. An object has attributes so, for example a car has a colour attribute. This attribute in turn has a value, which could be blue. An object can (and usually does) have a method or operation. This is basically the term for something that the object can do, or have done to it. A method for a car object for example, could be the drive method.

JavaScript supports objects such as browser, window, document, form or elements of these, which are also objects such as button, checkbox or text-field.






Back to Top Next Question












Question 3 - Is there more than one version of JavaScript ?

JavaScript is still evolving and there are several versions around at the moment. The original version (1.0) is now almost obsolete. Version 1.1 is far more robust and is by far the most heavily supported version at present. The newer version, 1.2 can handle newer elements like CSS far more comprehensively and includes more of the features found in Java, like the switch statement. There is another version which is still being standardized by the ISO (International Standards Organization).

JavaScript is Netscape's baby, but Microsoft also released a version called JScript. Versions of this are more or less compatible with equivalent versions of JavaScript.






Back to Top Next Question












Question 4 - But is JavaScript Simple ?

JavaScript is touted as a scripting language as opposed to as programming language, seeming to imply that such languages are simpler and that they are languages for 'non-programmers'. At first glance, JavaScript does appear to be a fairly simple language, along the lines of BASIC in its complexity. Indeed, for 'cookbook-style' programming tasks, it is quite a forgiving language. However, JavaScript is actually a full- featured programming language, as complex as any other. For day to day use in web-design, simple examples such as those shown in this site can be manipulated to produce some pretty snazzy effects, so don't get scared off by the big-words !






Back to Top Next Question












Question 5 - But is JavaScript Simple ?

Like HTML, JavaScript is just plain text. You can use any text editor which allows you to save in plain text format. Even a word-processor such as Microsoft Word or Lotus WordPro will do. (just remember to save as plain text).

You could also use one of the many WYSIWYG (what you see is what you get) editors which are available. Some of these provide extensive help with scripting. The best I've seen so far is Macromedia's 'Dreamweaver' which does everything short of making tea ! (you need to wait for version 3 for that !!!)
The benefit of using a tool like this is that it provides a function to check and debug your scripts, and can also ensure cross-browser compatibility (at least to some extent) which is the bane of web-developers lives.








Back to Top


<< BACK SUBMIT A QUESTION - HOME -